document.querySelector("#inject").addEventListener("click",()=>{
	let url = document.querySelector("#url").value;
	chrome.tabs.query({active: true, currentWindow: true},(tabs)=>{
		if(url){
			let code = `
				let s = document.createElement("script")
				s.src = "${url}";
				document.body.appendChild(s);
			`
			tabs.length&&chrome.tabs.executeScript(
			tabs[0].id,
			{
				code
			})
		}else
			tabs.length&&chrome.tabs.executeScript(
			tabs[0].id,
			{
				file:"./dist/bundle.js"
			})

	})
})